package com.example.common.util;

import com.example.sys.entity.User;
import com.example.sys.service.UserService;

/**
 * @author ZhengDing
 * @date 2022/2/13 15:37
 */

public class UserUtil {

    public static User getUser(Integer id) {
        UserService userService = SpringContextUtil.getUserService();
        User user = userService.getById(id);
        return user;
    }
    
    public static User createWithId(Integer id) {
        User user = new User();
        user.setId(id);
        return user;
    }
}
